package com.oig.sys.msg.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import java.io.Serializable;


/**
 * @author wuxl
 * 消息推送表
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_notice_msg_receiver")
@EntityListeners({AuditingEntityListener.class})
public class TbNoticeMsgReceiver implements Serializable {

	/**
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private Integer id;

	/**
	 */
	@Column(name = "msg_id", nullable = false)
	private Integer msgId;

	/**
	 */
	@Column(name = "receiver_id")
	private Integer receiverId;

	/**
	 */
	@Column(name = "receiver_name")
	private String receiverName;

	/**
	 * 00-未开始 01-待发送 02-已发送
	 * 字段已经没有用了
	 */
	@Column(name = "send_status")
	private String sendStatus;

	/**
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "send_time")
	private java.util.Date sendTime;

	/**
	 * 01-未读 02-已读
	 */
	@Column(name = "msg_status")
	private String msgStatus;

	/**
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "read_time")
	private java.util.Date readTime;

	/**
	 */
	@CreatedBy
	@Column(name = "create_user_id")
	private Integer createUserId;

	/**
	 */
	@Column(name = "create_user_name")
	private String createUserName;

	/**
	 */
	@CreatedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
	private java.util.Date createTime;

	/**
	 */
	@Version
	@Column(name = "version")
	private Integer version;

	/**
	 */
	@Column(name = "tenant_id")
	private Integer tenantId;

	/**
	 */
	@Column(name = "tenant_name")
	private String tenantName;

	@Column(name = "del_flag")
	public String delFlag;
}
